#include <cstdio>
#include <iostream>
#include <string.h>
#include <unistd.h>

int main()
{
    // 库函数
    printf("hello printf\n");
    fprintf(stdout, "hello fprintf\n");
    const char* s = "hello fwrite\n";
    fwrite(s, strlen(s), 1, stdout);

    // 系统调用
    const char* ss = "hello write\n";
    write(1, ss, strlen(ss));

    fork();
    //std::cout << "stdout : 1" << std::endl;
    //std::cout << "Hello Linux: stdout" << std::endl;

    //std::cerr << "cerr : 2" << std::endl;
    //std::cerr << "Hello Linux: cerr" << std::endl;
    return 0;
}
